GetPDeltaForce {Frame Object}

GetPDeltaForce

Syntax

SapObject.SapModel.FrameObj.GetPDeltaForce

VB6 Procedure

Function GetPDeltaForce(ByVal Name As String, ByRef NumberForces As Long, ByRef PDeltaForce() As Double, ByRef Dir() As Long, ByRef CSys() As String) As Long

Parameters

Name

The name of an existing straight frame object.

NumberForces

The number of P-Delta forces assigned to the frame object.

PDeltaForce

This is an array of the P-Delta force values assigned to the frame object. [F]

Dir

This is an array that contains 0, 1, 2 or 3, indicating the direction of each P-Delta force assignment.

0 = Frame object local 1-axis direction

1 = Projected X direction in CSys coordinate system

2 = Projected Y direction in CSys coordinate system

3 = Projected Z direction in CSys coordinate system

CSys

This is an array that contains the name of the coordinate system in which each projected P-Delta force is defined. This item is blank when the Dir item is zero, that is, when the P-Delta force is defined in the frame object local 1-axis direction.

Remarks

This function retrieves the P-Delta force assignments to frame objects. P-Delta forces do not apply to curved frame objects. If you request data for a curved frame, an error is returned.

The function returns zero if the assignments are successfully retrieved, otherwise it returns a nonzero value.

VBA Example

Sub GetFramePDeltaForce()

'dimension variables

Dim SapObject as cOAPI

Dim SapModel As cSapModel

Dim ret As Long

Dim NumberForces As Long

Dim PDeltaForce() As Double

Dim Dir() As Long

Dim CSys() As String

'create Sap2000 object

Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application

SapObject.ApplicationStart

'create SapModel object

Set SapModel = SapObject.SapModel

'initialize model

ret = SapModel.InitializeNewModel

'create model from template

ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign P-Delta force

ret = SapModel.FrameObj.SetPDeltaForce("ALL", 100, 0, True, , Group)

'get P-Delta force

ret = SapModel.FrameObj.GetPDeltaForce("3", NumberForces, PDeltaForce, Dir, CSys)

'close Sap2000

SapObject.ApplicationExit False

Set SapModel = Nothing

Set SapObject = Nothing

End Sub

Release Notes

Initial release in version 11.00.

See Also

SetPDeltaForce

DeletePDeltaForce